﻿using CloudMusic.Helper;
using CloudMusic.Model;
using DMSkin.Core.Common;
using System;
using System.Linq;
using System.Windows;

namespace CloudMusic
{
    public partial class App : Application
    {
        internal Uri RootVisual;
        DataServiceHelper ds = new DataServiceHelper();
        //public static event EventHandler loginStart;
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            var ui = ds.GetUserInfo();
            if (ui != null)
            {
                ui.OrderBy(t => t.UserId).ToList().ForEach(t => PlayListHelper.UserInfos.Add(t));
                //loginStart?.Invoke(null, null);
            }
            Execute.InitializeWithDispatcher();
        }

    }
}
